<?php
/**
 *
 * @use Spyc
 */

class DbYamlField extends DbTextField {

    public function toPhp($value) {
        return Spyc::YAMLLoad($value);
    }

    public function toDb($value) {
        $text=Spyc::YAMLDump($value);
        return parent::toDb($text);
    }
}